<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2019/11/28 0028
  Time: 13:54
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
</head>
<script src="jquery/jquery-3.0.0.min.js"></script>
<script>
    $(function () {
        $("#d1").click(function () {
            // alert("ok")
            $.ajax({
                type:"POST",
                url:"${pageContext.request.contextPath}/eeservlet?id=rua",
                success:function (msg) {
                    alert("data saved "+msg)
                },
                error:function (xhr) {
                    alert(xhr.status);
                    alert(xhr.responseText);
                }


            })
        })
    })
</script>
<body>
<input type="button" id="d1" value="测试">
</body>
</html>
